﻿using System;
using Newtonsoft.Json;

namespace ChinaTax.LeQi
{
    public class QueryTaxpayerRiskInfoRequest : Request<QueryTaxpayerRiskInfoResponse>
    {
        public QueryTaxpayerRiskInfoRequest()
        {
            ServiceCode = "CXNSRFXXX";
        }

        [JsonProperty("nsrsbh")]
        public string TaxNo { get => LeQiConfig.TaxNo; }
    }

    public class QueryTaxpayerRiskInfoResponse : Response
    {
        [JsonProperty("nsrsbh")]
        public string TaxNo { get; set; }

        [JsonProperty("fxnsrlx")]
        public string RiskType { get; set; }

        [JsonProperty("nsryjjb")]
        public string RiskGrade { get; set; }

        [JsonProperty("fxnsrbz")]
        public string RiskFlag { get; set; }

        [JsonProperty("nsrxydj")]
        public string CreditRank { get; set; }
    }

}
